class Admin < ActiveRecord::Base

  def self.check(name, password)
    admin = Admin.find_by_name(name)
    return false if admin.nil?
    return true if admin.password == password
    return false
  end

end
